package com.jctrip.hotel.management.client;

import com.jctrip.hotel.management.model.param.*;
import com.jctrip.hotel.management.model.result.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "FeizhuClient", url = "${feign.url.feizhu}")
@RequestMapping(headers = {"Content-Type=application/json", "accept=application/json", "routeId={routeId}"})
public interface FeizhuClient {
    @PostMapping("/info/getHotelName")
    Result<GetHotelNameResult> getHotelName(@RequestBody GetHotelNameParam param);

    @PostMapping("/info/getRoomTypeName")
    Result<GetRoomTypeNameResult> getRoomTypeName(@RequestBody GetRoomTypeNameParam param);

    @PostMapping("/info/getHotelId")
    Result<GetHotelIdResult> getHotelId(@RequestBody GetHotelNameParam param);

    @PostMapping("/info/getRoomTypeCode")
    Result<GetRoomTypeCodeResult> getRoomTypeCode(@RequestBody GetRoomTypeCodeParam param);

    @PostMapping("/info/closeRoom")
    Result<Boolean> closeRoom(@RequestBody UpdateRoomParam param);

    @PostMapping("/info/getFliggyHotels")
    Result<GetFliggyHotelResult> getFliggyHotels(@RequestBody GetFliggyHotelParam param);

    @PostMapping("/info/updateFliggyHotelsStatus")
    Result<Boolean> updateFliggyHotelsStatus(@RequestBody UpdateFliggyHotelsStatusParam param);

    @PostMapping("/info/updateFliggyHotelsPrice")
    Result<Boolean> updateFliggyHotelsPrice(@RequestBody UpdateFliggyHotelsPriceParam param);

    @PostMapping("/external/matchHotelSelf")
    Result<Boolean> matchHotelSelf(@RequestBody UpdateHotelMatchParam param);

    @PostMapping("/external/matchRoomSelf")
    Result<Boolean> matchRoomSelf(@RequestBody UpdateRoomMatchParam param);

    @GetMapping("/info/getStdHotel")
    Result<String> getStdHotel(@RequestParam("shid") Long shid);

    @GetMapping("/info/getPricePolicy")
    Result<GetFeizhuPricePolicyResult> getPricePolicy(@RequestParam String routeId,
                                                      @RequestParam Long pageNum,
                                                      @RequestParam Long pageSize);

    @PostMapping("/info/insertFliggyPricePolicy")
    Result<String> insertFliggyPricePolicy(@RequestBody InsertFeizhuPricePolicyParam param);

    @PostMapping("/info/updateFliggyPricePolicy")
    Result<String> updateFliggyPricePolicy(@RequestBody UpdateFeizhuPricePolicyParam param);

    @PostMapping("/info/updateFliggyPricePolicyRange")
    Result<String> updateFliggyPricePolicyRange(@RequestBody UpdateFeizhuPricePolicyRangeParam param);

}
